#!/bin/bash
scriptname=`readlink -e "$0"`
scriptpath=`dirname "$scriptname"`
scriptname=`basename "$scriptname" .sh`
set -e
set -x

cd $scriptpath

tlirc=lirc-$LIRC_VER
tiguana=iguanair-$IGUANA_VER
dlirc=lirc-$LIRC_VER
diguana=iguanaIR-$IGUANA_VER

./clean.sh

# uncomment to build iguana - warning there are many strange dependencies
tar xf $tiguana.tar.*
cd $diguana
./configure
make
sudo make install
cd packaging
make

cd $scriptpath
tar xf $tlirc.tar.*
cd $dlirc
./configure
make
sudo make install
sudo checkinstall -D --pkgname=lirc_mod --pkgversion=$LIRC_VER --install=no

